package com.yfp.file.domain;

import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

@Data
@Schema( name = "分片上传实体")
public class MultipartUploadDto {

    /**
     * 唯一上传id
     */
    @ApiModelProperty(value = "分片上传id",required = true)
    @NotNull(message = "上传id不能为空")
    private String uploadId;
    /**
     * 当前片数
     */

    @ApiModelProperty(value = "当前片数",required = true)
    @NotNull(message = "当前片数不能为空")
    private int partNumber;
    /**
     * 当前片大小
     */

    @ApiModelProperty(value = "当前片大小",required = true)
    @NotNull(message = "当前片大小不能为空")
    private long partSize;
    /**
     * 总片数
     */

    @ApiModelProperty(value = "总片数",required = true)
    @NotNull(message = "总片数不能为空")
    private int totalPart;
    /**
     * 当前片的md5值
     */

    @ApiModelProperty(value = "当前片的md5")
    private String md5;
    /**
     * 文件
     */

    @ApiModelProperty(value = "当前片文件",required = true)
    @NotNull(message = "文件不能为空")
    private MultipartFile file;
}
